from django.db import models

# Create your models here.
class JosMenu(models.Model):
    id = models.IntegerField(primary_key=True)
    menutype = models.CharField(max_length=225, blank=True)
    name = models.CharField(max_length=255, blank=True)
    alias = models.CharField(max_length=255)
    link = models.TextField(blank=True)
    type = models.CharField(max_length=50)
    published = models.IntegerField()
    parent = models.IntegerField()
    componentid = models.IntegerField()
    sublevel = models.IntegerField(null=True, blank=True)
    ordering = models.IntegerField(null=True, blank=True)
    checked_out = models.IntegerField()
    checked_out_time = models.DateTimeField()
    pollid = models.IntegerField()
    browsernav = models.IntegerField(null=True, db_column='browserNav', blank=True) # Field name made lowercase.
    access = models.IntegerField()
    utaccess = models.IntegerField()
    params = models.TextField()
    lft = models.IntegerField()
    rgt = models.IntegerField()
    home = models.IntegerField()
    class Meta:
        db_table = u'jos_menu'

class JosMenuTypes(models.Model):
    id = models.IntegerField(primary_key=True)
    menutype = models.CharField(unique=True, max_length=225)
    title = models.CharField(max_length=255)
    description = models.CharField(max_length=255)
    class Meta:
        db_table = u'jos_menu_types'

class JosModulesMenu(models.Model):
    moduleid = models.IntegerField(primary_key=True)
    menuid = models.IntegerField(primary_key=True)
    class Meta:
        db_table = u'jos_modules_menu'

class JosTemplatesMenu(models.Model):
    template = models.CharField(max_length=255, primary_key=True)
    menuid = models.IntegerField(primary_key=True)
    client_id = models.IntegerField(primary_key=True)
    class Meta:
        db_table = u'jos_templates_menu'
